#!/bin/bash

if [ -z "$1" ]
  then
    echo "No config argument supplied"
else
    if [ "$EUID" -ne 0 ]
        then
            echo "WARNING: If running locally then you may require sudo due to port issues "
            echo ""
    fi
    NODE_ENV=$1 NODE_CONFIG_DIR='./config' node $2 "./backend/3drepo.js"
fi
